#ifndef _Cbook_H_
#define _Cbook_H_

#include <string>

#define Type_Normalbook 1
#define Type_Magazine 2
#define Type_Spbook 3

class Cbook
{
	protected:
		std::string name;
		bool state;

	public:
		Cbook();
		Cbook(const Cbook&);
		Cbook(std::string);
		Cbook(std::string, bool);
		void init(std::string, bool);
		std::string get_name() const;
		bool get_state() const;
};

class Normalbook: public Cbook
{
	private:
		bool in_library;
		bool broken;

	public:
		Normalbook();
		Normalbook(const Normalbook&);
		Normalbook(std::string);
		int get_type_book()const;
		bool change();
		bool borrow();
		bool in(int);
};

class Magazine: public Cbook
{
	public:
		Magazine();
		Magazine(const Magazine&);
		Magazine(std::string);
		int get_type_book()const;
		bool change();
};

class Spbook: public Cbook
{
	private:
		int copy_cnt;

	public:
		Spbook();
		Spbook(const Spbook&);
		Spbook(std::string);
		int get_type_book()const;
		bool change();
		bool copy();
		int get_copy_cnt()const;
};

#endif
